[SIGIO] (UNBLOCK_INPUT): Resignal if x_pending_input.
authorRichard M. Stallman <rms@gnu.org>
Tue, 16 Mar 1993 05:54:56 +0000 (05:54 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 16 Mar 1993 05:54:56 +0000 (05:54 +0000)
src/xterm.h

index 6fce7eb2a55827e63b2b1bfe887a6a307af8a841..54a495d7bb09c9e2dc07eda1a5940d85067e0101 100644 (file)
@@ -180,8 +180,16 @@ extern int x_pending_input;
 #define BLOCK_INPUT (x_input_blocked++)
 
 /* End critical section. */
+#ifdef SIGIO
+/* If doing interrupt input, and an interrupt came in when input was blocked,
+   reinvoke the interrupt handler now to deal with it.  */
+#define UNBLOCK_INPUT \
+  ((x_input_blocked--, (x_input_blocked < 0 ? (abort (), 0) : 0)),     \
+   (x_input_blocked == 0 && x_pending_input != 0 ? (kill (0, SIGIO), 0) : 0))
+#else
 #define UNBLOCK_INPUT \
   (x_input_blocked--, (x_input_blocked < 0 ? (abort (), 0) : 0))
+#endif
 
 #define TOTALLY_UNBLOCK_INPUT (x_input_blocked = 0)
 #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT